/*
 * Selling Partner API for Messaging
 *
 * With the Messaging API you can build applications that send messages to buyers. You can get a list of message types that are available for an order that you specify, then call an operation that sends a message to the buyer for that order. The Messaging API returns responses that are formed according to the <a href=https://tools.ietf.org/html/draft-kelly-json-hal-08>JSON Hypertext Application Language</a> (HAL) standard.
 *
 * The version of the OpenAPI document: v1
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = software.amzn.spapi.Client.OpenAPIDateConverter;

namespace software.amzn.spapi.Model.messaging.v1
{
    /// <summary>
    /// The request schema for the createWarranty operation.
    /// </summary>
    [DataContract(Name = "CreateWarrantyRequest")]
    public partial class CreateWarrantyRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateWarrantyRequest" /> class.
        /// </summary>
        /// <param name="attachments">Attachments to include in the message to the buyer. If any text is included in the attachment, the text must be written in the buyer&#39;s language of preference, which can be retrieved from the GetAttributes operation..</param>
        /// <param name="coverageStartDate">The start date of the warranty coverage to include in the message to the buyer..</param>
        /// <param name="coverageEndDate">The end date of the warranty coverage to include in the message to the buyer..</param>
        public CreateWarrantyRequest(List<Attachment> attachments = default(List<Attachment>), DateTime coverageStartDate = default(DateTime), DateTime coverageEndDate = default(DateTime))
        {
            this.Attachments = attachments;
            this.CoverageStartDate = coverageStartDate;
            this.CoverageEndDate = coverageEndDate;
        }

        /// <summary>
        /// Attachments to include in the message to the buyer. If any text is included in the attachment, the text must be written in the buyer&#39;s language of preference, which can be retrieved from the GetAttributes operation.
        /// </summary>
        /// <value>Attachments to include in the message to the buyer. If any text is included in the attachment, the text must be written in the buyer&#39;s language of preference, which can be retrieved from the GetAttributes operation.</value>
        [DataMember(Name = "attachments", EmitDefaultValue = false)]
        public List<Attachment> Attachments { get; set; }

        /// <summary>
        /// The start date of the warranty coverage to include in the message to the buyer.
        /// </summary>
        /// <value>The start date of the warranty coverage to include in the message to the buyer.</value>
        [DataMember(Name = "coverageStartDate", EmitDefaultValue = false)]
        public DateTime CoverageStartDate { get; set; }

        /// <summary>
        /// The end date of the warranty coverage to include in the message to the buyer.
        /// </summary>
        /// <value>The end date of the warranty coverage to include in the message to the buyer.</value>
        [DataMember(Name = "coverageEndDate", EmitDefaultValue = false)]
        public DateTime CoverageEndDate { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class CreateWarrantyRequest {\n");
            sb.Append("  Attachments: ").Append(Attachments).Append("\n");
            sb.Append("  CoverageStartDate: ").Append(CoverageStartDate).Append("\n");
            sb.Append("  CoverageEndDate: ").Append(CoverageEndDate).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
